﻿using System;

namespace _1342_number_of_steps_to_reduce_a_number_to_zero
{
    class Program
    {
        static void Main (string[] args)
        {
            Console.Write (NumberOfSteps (14));
        }

        public static int NumberOfSteps (int num)
        {
            int count = 0;
            while (num != 0)
            {
                count++;
                num = num % 2 > 0 ? num - 1 : num / 2;
            }
            return count;
        }
    }
}
